package com.edu.lxshpc.utils;

import com.aliyun.oss.common.auth.CredentialsProviderFactory;
import com.aliyun.oss.common.auth.EnvironmentVariableCredentialsProvider;
import com.aliyuncs.exceptions.ClientException;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;


/**
 * @author zgh
 * @date 2024/2/19
 */
@Data
public class OssProperties {
    private  final String endpoint = "https://oss-cn-beijing.aliyuncs.com";
    private  final String bucketName = "mediafileszgh";
    private EnvironmentVariableCredentialsProvider credentialsProvider;
    public OssProperties() throws ClientException {
        this.credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider();
    }
}
